package com.copa.gameStore.client;

import com.copa.gameStore.domain.User;
import com.copa.gameStore.domain.UserAccount;
import com.copa.gameStore.dto.UserAccountFeignDto;
import com.copa.gameStore.vo.ResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("game-user")
public interface UserClient {

//    @GetMapping("userInfo")
//    ResponseVo<UserVo> userInfo(@RequestParam("authorization") String authorization);
    @GetMapping("findByUsername")
    User findByUsername(@RequestParam("username") String username);

    @GetMapping("{id}")
    ResponseVo<User> getUser(@PathVariable("id") Long id);

    @PostMapping("takeAccount")
    void takeAccount(@RequestBody UserAccountFeignDto userAccountFeignDto);

    @GetMapping("accountByUserId")
    UserAccount accountByUserId(@RequestParam("userId") Long userId);

//    @GetMapping("account")
//    ResponseVo<UserAccount> getAccount();
}
